home *** CD-ROM | disk | FTP | other *** search
/ The Games Machine 76 / XENIATGM66.iso / Indiana Jones / Indiana Jones.exe / RESOURCE / PREVIEW.GOB / cog_jep_commie_intro.cog < prev    next >
Text File  |  1999-11-15  |  2KB  |  95 lines

  1. # Jones 3D Cog Script
  2. #
  3. # jep_commie_intro.cog
  4. #
  5. # [DS] [GGJ]
  6. #
  7. # (C) 1999 LucasArts Entertainment Co. All Rights Reserved
  8. # ==============================================================================
  9.  
  10. symbols
  11.  
  12.     message        startup
  13.     message        entered
  14.  
  15.     sector        sec_commieTrigger    
  16.     thing        commiepos0                                nolink
  17.     thing        commiepos1                                nolink
  18.     thing        commiepos2                                nolink
  19.     thing        movepos0                                nolink
  20.     thing        movepos1                                nolink
  21.     thing        movepos2                                nolink
  22.     template    commie_tpl0=jungle_tokarev                    local
  23.     template    commie_tpl1=Khaki_simonov                    local
  24.     thing        player                                local
  25.     thing        commie0                                local
  26.     thing        commie1                                local
  27.     thing        commie2                                local
  28.     int            int_demoVar=0                                    #set to 1 in demo
  29.     int            int_triggerOnce=0                    local
  30.     flex        commieWake                            local
  31. end
  32.  
  33. # ==============================================================================
  34.  
  35. code
  36.  
  37. startup:
  38.     
  39.     if (int_demoVar == 1) return;
  40.  
  41.     call commieWake;
  42.     return;
  43.  
  44. # ==============================================================================
  45. entered:
  46.     if (GetSenderRef() != sec_commieTrigger) return;
  47.     if (int_triggerOnce != 0) return;
  48.     int_triggerOnce = 1;
  49.     call commieWake;
  50.     return;
  51.  
  52. # ==============================================================================
  53. commieWake:
  54.  
  55.     player=GetLocalPlayerThing(); 
  56.  
  57.     # Make commies...
  58.              commie0 = CreateThing(commie_tpl0, commiepos0);
  59.         AISetCutsceneMode(commie0);
  60.         CaptureThing(commie0);
  61.         ClearThingFlags(commie0, 0x80000);
  62.              commie1 = CreateThing(commie_tpl1, commiepos1);
  63.         AISetCutsceneMode(commie1);
  64.         CaptureThing(commie1);
  65.         ClearThingFlags(commie1, 0x80000);
  66.             commie2 = CreateThing(commie_tpl0, commiepos2);
  67.         AISetCutsceneMode(commie2);
  68.         CaptureThing(commie2);
  69.         ClearThingFlags(commie2, 0x80000);
  70.         AISetCutsceneMode(commie0);
  71.         AISetCutsceneMode(commie1);
  72.         AISetCutsceneMode(commie2);
  73.  
  74.     sleep(30.0);
  75.     AISetMoveSpeed(commie0, 0.8);
  76.     AISetMoveSpeed(commie1, 1.0);
  77.     AISetLookThingEyeLevel(commie0, movepos0);
  78.     AISetLookThingEyeLevel(commie1, movepos1);
  79.     AISetMoveThing(commie0, movepos0, 0);
  80.     sleep(0.5);
  81.     AISetMoveThing(commie1, movepos1, 1);
  82.     sleep(0.5);
  83.     AISetMoveSpeed(commie2, 1.0);
  84.     AISetLookThingEyeLevel(commie2, movepos2);
  85.     AISetMoveThing(commie2, movepos2, 0);
  86.  
  87.         AIClearCutsceneMode(commie0);
  88.         AIClearCutsceneMode(commie1);
  89.         AIClearCutsceneMode(commie2);
  90.  
  91.     return;
  92.  
  93. end
  94.  
  95.